package cn._2dland.websocket.exception;

public class HandshakeException extends Exception {

	private static final long serialVersionUID = 1L;
	
	/** 原因：未知 */
	public static final int REASON_UNKNOWN = 0;
	/** 原因：无效请求 */
	public static final int REASON_INVALID_REQUEST = 1;
	/** 原因：失败 */
	public static final int REASON_FAILED = 2;

	/** 异常原因 */
	private int reason = REASON_UNKNOWN;

	public HandshakeException(int reason) {
		this.reason = reason;
	}

	public int getReason() {
		return reason;
	}

}
